The 'bestSize' variable isn't necessary anymore, remove it in favor of
simply returning the 'size' or, if no suitable size found, IconSize.TINY.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1518>
if (this._fixedIconSize !== -1)
return this._fixedIconSize;
- let bestSize;
const iconSizes = Object.values(IconSize).sort((a, b) => b - a);
for (const size of iconSizes) {
let usedWidth, usedHeight;
this._pageHeight - usedHeight - rowSpacingPerPage -
this._pagePadding.top - this._pagePadding.bottom;
- bestSize = size;
-
if (emptyHSpace >= 0 && emptyVSpace > 0)
- break;
+ return size;
}
- return bestSize;
+ return IconSize.TINY;
}
_getChildrenMaxSize() {